package com.platform.qujia.controller;

import com.platform.qujia.service.SxfCallbackService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @date 2023/11/9
 */
@RestController
@RequestMapping("sxf")
public class SxfCallbackController {

    @Autowired
    private SxfCallbackService sxfCallbackService;

    /**
     * 随行付机构交易推送接口
     * 该接口只处理银行卡交易推送，不处理二维码交易
     * @param request
     * @return
     */
    @PostMapping("unifiedCallback")
    public String unifiedCallback(@RequestBody Map<String,Object> request){
        return sxfCallbackService.unifiedCallback(request);
    }



    @PostMapping("launchLedgerTest")
    public String launchLedgerTest(@RequestBody Map<String,Object> request){
        return sxfCallbackService.launchLedger(request);
    }



}
